var app = {
	appkey: "VHNbUZHlPyMsEuGWkbkbKVqzUhKEDFwq",
	appsecret: "AltIfxLGCortbfNxqimUqXXZptyWCyXi",
	mcloud: "http://hw.mashupcloud.cn/mcloud/"
};
var token;
$(function() {
	token = sessionStorage.getItem("token");
	if(!token) {
		$.ajax({
			type: "post",
			url: app.mcloud + "developer/auth.do",
			async: true,
			data: {
				appkey: app.appkey,
				appsecret: app.appsecret
			},
			success: function(data) {
				console.log(data);
				token = JSON.parse(data)[1];
				sessionStorage.setItem("token", token);
			},
			error: function(err) {
				console.log(err);
			}
		});
	}
});